package chapter_5;

public class Cat {
    private String name;
    private int age;

    private Cat(){
        System.out.println("无参构造方法");
    }

    private static Cat cat = new Cat();

    public static Cat getInstance(){
        return cat;
    }
    //单例模式

}
